package com.gipson.amc.utils;

/**
 * @author cjw 2020-03-18
 */
public class Constants {

	public static final String SUCCESS = "success";

	public static final String ERROR = "error";

	public static final String ERROR_PAGE="/basicdata/common/error";

	/**
	 * 文件路径前缀(未部署时使用)。
	 */
	public static final String FilePathPrefix_NoDeployed = "./src/main/resources";

	public static final String UPLOAD_FILE_PREFIX = "${FILE}"; // 文件前缀



	public static final String CLIENT_TOKEN_PREFIX = "CLIENT_TOKEN_";
	public static final String CLIENT_TOKEN_DATABASE = "client-token";
	public static final Integer EXPIRE_CLIENT_TOKEN = 86400;

	public static final Long SESSION_EXPIRED = 86400000L; //session过期时间,单位:秒
	public static final Integer COOKIE_MAX_AGE = 300; //设置记住我的时间 单位是秒

	/**********
	 *网络请求返回状态码
	 */
	public static final Integer NETWORK_STATE_USER_NOT_EXIST = 601;  //用户不存在
	public static final Integer NETWORK_STATE_INVALID_PASSWORD = 602;  //用户名密码错误

	public static final Integer NETWORK_STATE_APP_NOT_EXIST = 701;  //应用不存在
	public static final Integer NETWORK_STATE_INVALID_ACCESS = 702;  //非法访问
	public static final Integer NETWORK_STATE_TOKEN_EXPIRED = 703;  //token过期


	public static final String NO_PERMISSION_PAGE = "403";

	public static final String HEADER_APPID_NAME = "X-APPID";

	public static final String HEADER_CLIENT_TOKEN_NAME = "X-CLIENT-TOKEN";
}
